//救助页面
function toSuccourTabs() {
    var row = grid.getSelected();
    $.ajax({
        url: "/azbj/inmates/getHasDate?priNum=" + row.priNum,
        type: "GET",
        async: false,
        success: function (result) {
            if (result == "no") {
                mini.alert("请补录该服刑人员的刑期起止日");
            } else {
                mini.open({
                    url: "/azbj/bjdxInfo/qbrygl/toAllTab/view?priNum=" + row.priNum+"&type="+2,
                    title: "救助",
                    width: "60%",
                    height: "85%",
                    allowDrag: true,
                    allowResize: false,
                    showCloseButton: true,
                    onload: function () {
                    },
                    ondestroy: function (action) {
                        grid.reload();
                    }
                });
            }
        }
    })
}

//帮教页面
function toHelpTabs() {
    var row = grid.getSelected();
    $.ajax({
        url: "/azbj/inmates/getHasDate?priNum=" + row.priNum,
        type: "GET",
        async: false,
        success: function (result) {
            if (result == "no") {
                mini.alert("请补录该服刑人员的刑期起止日");
            } else {
                mini.open({
                    url: "/azbj/bjdxInfo/qbrygl/toAllTab/view?priNum=" + row.priNum+"&type=" + 3,
                    title: "帮教信息",
                    width: "60%",
                    height: "85%",
                    allowDrag: true,
                    allowResize: false,
                    showCloseButton: true,
                    onload: function () {
                    },
                    ondestroy: function (action) {
                        grid.reload();
                    }
                });
            }
        }
    })
}

//跳转年度鉴定列表页面
function toAppraiseListTabs() {
    var row = grid.getSelected();
    mini.open({
        // targetWindow: window,
        url: "/azbj/azbjgl/azgzgl/view/toAppraiseListTabs?priNum=" + row.priNum,
        title: "年度鉴定",
        width: "60%",
        height: "80%",
        allowDrag: true,
        allowResize: false,
        showCloseButton: true,
        onload: function () {
        },
        ondestroy: function (action) {
            grid.reload();
        }
    });
}

function onWxcdRenderer(e) {
    var fs = e.value;
    var s = "";
    if (fs == "" || !fs) {
        return "";
    }
    if (fs > 50) {
        s = '<span style="color: red">高危险性人员</span> ';
    } else if (fs > 40 && fs <= 50) {
        s = '<span style="color: #ee623c ">较高危险性人员</span> ';
    } else if (fs > 30 && fs <= 40) {
        s = '<span style="color: #ff5a39 ">一般等级危险性人员</span> ';
    } else {
        s = '<span style="color: #2b7dbc ">低等级危险性人员</span> ';
    }
    return s;
}

//查看
function toViewHjqc() {
    var row = grid.getSelected();
    mini.open({
        url: "/azbj/bjdxInfo/hjqc/toViewTabs/view?priNum=" + row.priNum,
        title: "查看",
        width: "60%",
        height: "80%",
        allowDrag: true,
        allowResize: false,
        showCloseButton: true,
        onload: function () {
        },
        ondestroy: function (action) {
            grid.reload();
        }
    });
}